home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / utils / file / managers / git-4.3 / git-4 / git-4.3.7 / src / xstring.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-07-08  |  2.1 KB  |  78 lines

  1. /* xstring.h -- prototypes for the functions in xstring.c. */
  2.  
  3. /* Copyright (C) 1993, 1994, 1995 Free Software Foundation, Inc.
  4.  
  5.    This program is free software; you can redistribute it and/or modify
  6.    it under the terms of the GNU General Public License as published by
  7.    the Free Software Foundation; either version 2, or (at your option)
  8.    any later version.
  9.  
  10.    This program is distributed in the hope that it will be useful,
  11.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  12.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13.    GNU General Public License for more details.
  14.  
  15.    You should have received a copy of the GNU General Public License
  16.    along with this program; if not, write to the Free Software
  17.    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  18.  
  19. /* Written by Tudor Hulubei and Andrei Pitis.  */
  20.  
  21.  
  22. #ifndef _GIT_XSTRING_H
  23. #define _GIT_XSTRING_H
  24.  
  25.  
  26. #include <sys/types.h>
  27.  
  28. #if defined(STDC_HEADERS) || defined(HAVE_STRING_H)
  29.  
  30. #include <string.h>
  31. /* An ANSI string.h and pre-ANSI memory.h might conflict.  */
  32.  
  33. #if !defined(STDC_HEADERS) && defined(HAVE_MEMORY_H)
  34. #include <memory.h>
  35. #endif /* !STDC_HEADERS and HAVE_MEMORY_H */
  36.  
  37. #ifndef index
  38. #define index strchr
  39. #endif
  40.  
  41. #ifndef rindex
  42. #define rindex strrchr
  43. #endif
  44.  
  45. #define bcopy(s, d, n) memcpy ((d), (s), (n))
  46. #define bcmp(s1, s2, n) memcmp ((s1), (s2), (n))
  47. #define bzero(s, n) memset ((s), 0, (n))
  48.  
  49. #else /* !STDC_HEADERS and !HAVE_STRING_H */
  50.  
  51. #include <strings.h>
  52. /* memory.h and strings.h conflict on some systems.  */
  53. #endif /* !STDC_HEADERS and !HAVE_STRING_H */
  54.  
  55.  
  56. #include "stdc.h"
  57.  
  58.  
  59. #ifndef HAVE_STRCASECMP
  60. extern int strcasecmp __P((const char *, const char *));
  61. #endif /* !HAVE_STRCASECMP */
  62.  
  63. #ifndef HAVE_STRNCASECMP
  64. extern int strncasecmp __P((const char *, const char *, size_t));
  65. #endif /* !HAVE_STRNCASECMP */
  66.  
  67. #ifndef HAVE_STRSTR
  68. extern char *strstr __P((const char *, const char *));
  69. #endif /* !HAVE_STRSTR */
  70.  
  71. #ifndef HAVE_MEMMOVE
  72. extern void *memmove __P((void *, const void *, size_t));
  73. #endif /* !HAVE_MEMMOVE */
  74.  
  75. extern char *xstrdup __P((const char *));
  76.  
  77. #endif  /* _GIT_XSTRING_H */
  78.